Terrain/furniture: code deduplication and improved "copy-from" support #77637
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Infrastructure "terrain/furniture: code deduplication and improved copy-from support"
Purpose of change
Roughly the other half of #73211;
copy-from
terrain/furniture is a desirable featureCloses #54702
Describe the solution
TRANSPARENT
flag inherits correctlyflags
support extend/deleteconnect_groups
,connects_to
androtates_to
support copy-frommap_X_bash_info
andmap_X_deconstruct_info
optional, replaces bad "str_max > -1" checksSorry for the encroaching line count. A lot of the line "additions" are very minor, like '.' to '->'
This PR should not make any functional changes to gameplay.
Describe alternatives you've considered
What's left to be done (next on my to-do list):
symbol
,color
supports copy-frombash
, etc. special inheritance handlingOnce all that's done, attempt to implement abstract furniture/terrain; there's a ton of JSON bloat that can be removed.
Testing
Passed all tests, clang-tidy should be good
Made sure the following work as usual:
I made five test walls and they all worked as expected, including connect groups and rotation:
"extend": { "flags": ["TRANSPARENT"] }
"delete": { "flags": ["TRANSPARENT"] }
"delete": { "flags": ["FLAMMABLE"] }
"extend": { "flags": ["TRANSPARENT"] }
Additional context
Proof for #54702: removed
flags
fromt_deck_coating_no_roof_r
and it's still transparentAs with last time, thanks to @Procyonae for writing the original PR, I just cleaned it up